<?php 
require_once("includes/functions.php");
require_once("includes/session.php"); 
ensure_logged_in("public");
generate_header("public", "Welcome to FSE Bank");
?>
<div id="login">
<?php
  if(isloggedin()){
    $output = "<p>You are already logged in!<p>";
    $output .= "<p>Please <a href=\"". get_base_link("public") ."\">click here</a> to access your accounts or <a href=\"signoff.php\">click here</a> to logout</p>";
  }
  else{
  $output = '
  <form id="login_form" method="post" action="form_processing/login_form.php">
    <fieldset>
      <legend>Login Information</legend>';
	if(isset($_GET['credentials'])){
	  $output .= "<p><strong>The given username/password combination does not exist! Please make sure that the password and username are in the proper case</strong></p>";
	};
	if(isset($_GET['at'])){
	  $output .=  "<p><strong>Please log in to access authorized pages!</strong></p>";
	};
  $output .= '
      <ul>
	<li><label for="login_username">Username: </label>
	<input type="text" id="login_username" name="userid"
	       size="10" /></li>
	<li><label for="login_password">Password: </label>
	<input type="password" id="login_password" name="userpass"
	       size="10" /></li>
      </ul>
      <input type="submit" value="Log in" />
    </fieldset>
  </form>';
  }
  echo $output;
?>
</div>


<div id="description">
  <h2> Who we are</h2>
  <p>FSE Bank is a ground-breaking banking group, dedicated to changing the way the world views online banking.  Our creative new online presence mates perfectly with our hundreds of locations worldwide, letting you bank any time, anywhere, and anyhow.  Never worked with FSE Bank?  Maybe it's time you tried.</p>
  <h2>What we do</h2>
  <p>FSE Bank offers the most fundamental and useful banking functions to our thousands of customers.  You can deposit, withdraw, and transfer money to and from any of your numerous accounts with our innovative service.  This sleek, streamlined system makes banking easy, straightforward, and simple, so you can spend more time living and less time banking.  Time is money, and at FSE bank, we save your time while we save your money.</p>

</div>
<?php
	  include("includes/footer.php");
?>
